package com.pi.shisan.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pi.shisan.service.domain.WeatherCity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface WeatherCityMapper extends BaseMapper<WeatherCity> {

    /**
     * 用于检查天气是否成功初始化完毕
     * @return
     */
    @Select("select id from led_weather_city where city_id = '101340406' limit 1")
    Long checkHasInitFinished();

    /**
     * 用于如果没有成功初始化完成，则清空表重新初始化
     */
    @Delete("delete from led_weather_city")
    void clear();

}
